﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TaskWebApplicationUI.ListTaskView"
         Theme="TaskTheme" ValidateRequest="false" MasterPageFile="WebTasksMaster.Master" %>


<asp:Content ID="Content1" ContentPlaceHolderID="MasterPagePlaceHolder" runat="server">
    <p align="center">
        <asp:Label ID="Department" SkinID="Department" runat="server" Text="Отдел"></asp:Label>

    </p>

    <div align="right">
    </div>
    <asp:DataList ID="ExecutorsList" runat="server" OnItemDataBound="ExecutorsList_ItemDataBound"
                  Width="100%">
        <ItemTemplate>
            <br />
            <asp:Label ID="FullNameLabel" runat="server" Text='<%#Eval("FullName")%>' SkinID="Executor"></asp:Label>
            &nbsp;<asp:Label ID="Label1" runat="server" Text="(всего:" SkinID="Executor"></asp:Label>
            <asp:Label ID="TaskCountLabel" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CountTask")%>'
                       SkinID="Executor"></asp:Label>
            <asp:Label ID="Label2" runat="server" Text=")" SkinID="Executor"></asp:Label>
            <br />
            <asp:GridView ID="TasksListGridView" runat="server" AutoGenerateColumns="False" BorderWidth="0px"
                          CssClass="grid-view" GridLines="Vertical" CellPadding="4" Width="100%" AllowSorting="True"
                          OnSorting="TasksListGridView_Sorting" EnableModelValidation="True">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="dot" runat="server" ImageUrl="images/dot.gif" Height="15" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Right" />
                        <ItemStyle CssClass="bodyt" Width="15" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" 
                                           NavigateUrl='<%#Eval("HyperLink")%>' Text='<%#Eval("TaskName")%>'></asp:HyperLink>
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Left" />
                        <ItemStyle CssClass="bodyt" HorizontalAlign="Left" Wrap="False" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Exclamation" runat="server" ImageUrl="images/exclamation.gif" Visible='<%#Eval("ImageLink.Exclamation")%>'
                                       Height="15" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Right" />
                        <ItemStyle CssClass="bodyt" Width="15" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Reminder" runat="server" ImageUrl="images/reminder.gif" Visible='<%#Eval("ImageLink.Reminder")%>'
                                       Height="15" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Right" />
                        <ItemStyle CssClass="bodyt" Width="15" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="iamParticipant" runat="server" ImageUrl="images/participant.gif" Visible='<%#Eval("ImageLink.iamParticipant")%>'
                                       Height="15" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Right" />
                        <ItemStyle CssClass="bodyt" Width="15" />
                    </asp:TemplateField>
                    <asp:BoundField HtmlEncode="false" HeaderText="Владелец" DataField="Owner" SortExpression="Owner">
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Right" />
                        <ItemStyle CssClass="bodyt" Width="15%" Wrap="False" HorizontalAlign="Right" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="Создана"
                                    DataFormatString="{0:d} {0:t}" DataField="DateCreate" SortExpression="DateCreate">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="5%" Wrap="False" HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="Срок"
                                    DataFormatString="{0:d} {0:t}" DataField="DateExpiration" SortExpression="DateExpiration">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="5%" Wrap="False" 
                                   HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="Запись"
                                    DataFormatString="{0:d}" DataField="DateLastComment" SortExpression="DateLastComment">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="3%" Wrap="False" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="Важность"
                                    DataField="Priority" SortExpression="Priority">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="1%" Wrap="False" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="%" DataField="Complete">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="0.5%" Wrap="False" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderText="Тег" DataField="Tag" SortExpression="Tag">
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Center" />
                        <ItemStyle CssClass="bodyt" Width="5%" Wrap="False" HorizontalAlign="Left" />
                    </asp:BoundField>
                </Columns>
                <HeaderStyle BorderStyle="None" />
            </asp:GridView>
        </ItemTemplate>
    </asp:DataList>
</asp:Content>